package com.app.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.sql.Timestamp;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("lm_user")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class UserModel {
    @TableId(type = IdType.AUTO)
    private Integer id;//用户ID
    private String name;//昵称
    private String phone;//电话
    private String avatar;//头像
    private Integer status;//用户状态1是 0否
    private String areaId;//地区id
    private String areaName;
    private String openId;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Timestamp createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Timestamp updateTime;
    @TableField(exist = false)
    private List<AreaModel> area;
}
